import request from "@/utils/request";

// 资产类型
export function dataList(query) {
  return request({
    url: "/system/dict/data/list",
    method: "get",
    params: query,
  });
}
// 资产类型List
export function propertyDictList(data) {
  return request({
    url: "/property/dict/data/list",
    method: "post",
    data,
  });
}

// 【首页】权属列表
export function propertyOwnList(query) {
  return request({
    url: "/property/index/own/list",
    method: "get",
    params: query,
  });
}

//【首页】管理单位列表
export function propertydeptGroup(data) {
  return request({
    url: "/property/index/dept/group",
    method: "post",
    data,
  });
}

//【首页】统计资产类型
export function propertyTypeGroup(data) {
  return request({
    url: "/property/index/type/group",
    method: "post",
    data,
  });
}

//【首页】经营性总建筑面积
export function propertyBuildingArea(data) {
  return request({
    url: "/property/index/total/building/area",
    method: "post",
    data,
  });
}

//【首页】资产分页
export function propertyIndexPage(data) {
  return request({
    url: "/property/index/page",
    method: "post",
    data,
  });
}

//【首页】新增 资产
export function addProperty(data) {
  return request({
    url: "/property/index/add",
    method: "post",
    data,
  });
}

//【首页】编辑 资产
export function editProperty(data) {
  return request({
    url: "/property/index/edit",
    method: "post",
    data,
  });
}

//【首页】灭活 资产
export function archivingProperty(data) {
  return request({
    url: "/property/index/archiving",
    method: "post",
    data,
  });
}

//【首页】删除 资产
export function delProperty(propertyId) {
  return request({
    url: `/property/index/del/${propertyId}`,
    method: "get",
  });
}

//【详情】批量编辑 资产类型
export function editBatchProperty(data) {
  return request({
    url: "/property/detail/type/batch/edit",
    method: "post",
    data,
  });
}

//【详情】资产 存在问题及下一步打算
export function existProblemProperty(data) {
  return request({
    url: "/property/detail/exist/problem",
    method: "post",
    data,
  });
}

//【详情】资产基本信息
export function detailBaseProperty(propertyId) {
  return request({
    url: `/property/detail/base/${propertyId}`,
    method: "get",
  });
}

// 所在社区列表
export function areaList(data) {
  return request({
    url: "/system/area/list",
    method: "post",
    data,
  });
}

// 商铺资产单元列表
export function spList(data) {
  return request({
    url: "/property/unit/sp/list",
    method: "post",
    data,
  });
}

// 公寓资产单元列表
export function gyList(data) {
  return request({
    url: "/property/unit/gy/list",
    method: "post",
    data,
  });
}

// 办公资产单元列表
export function bgList(data) {
  return request({
    url: "/property/unit/bg/list",
    method: "post",
    data,
  });
}

// 综合体资产单元列表
export function zhtList(data) {
  return request({
    url: "/property/unit/zht/list",
    method: "post",
    data,
  });
}

// 工业厂房资产单元列表
export function gycfList(data) {
  return request({
    url: "/property/unit/gycf/list",
    method: "post",
    data,
  });
}

// 新增 资产单元
export function addUnit(data) {
  return request({
    url: "/property/unit/add",
    method: "post",
    data,
  });
}

// 编辑 资产单元
export function editUnit(data) {
  return request({
    url: "/property/unit/edit",
    method: "post",
    data,
  });
}

// 灭失 资产单元
export function archivingUnit(data) {
  return request({
    url: "/property/unit/archiving",
    method: "post",
    data,
  });
}

// 删除 资产单元
export function delUnit(propertyUnitId) {
  return request({
    url: `/property/unit/del/${propertyUnitId}`,
    method: "get",
  });
}

// 资产单元详情
export function detailBasePropertyUnit(propertyUnitId) {
  return request({
    url: `/property/unit/base/${propertyUnitId}`,
    method: "get",
  });
}

// 资产单元 租赁信息
export function leaseListPropertyUnit(propertyUnitId) {
  return request({
    url: `/property/unit/lease/list/${propertyUnitId}`,
    method: "get",
  });
}

// 资产单元 租赁信息历史记录
export function leaseHistoryPropertyUnit(propertyUnitId) {
  return request({
    url: `/property/unit/lease/history/${propertyUnitId}`,
    method: "get",
  });
}

// 新增 租赁信息
export function addLease(data) {
  return request({
    url: "/property/unit/lease/add",
    method: "post",
    data,
  });
}

// 编辑 租赁信息
export function editLease(data) {
  return request({
    url: "/property/unit/lease/edit",
    method: "post",
    data,
  });
}

// 归档 租赁信息
export function archivingLease(data) {
  return request({
    url: "/property/unit/lease/archiving",
    method: "post",
    data,
  });
}

// 删除 租赁信息
export function delLease(leaseId) {
  return request({
    url: `/property/unit/lease/del/${leaseId}`,
    method: "get",
  });
}

// 资产单元 评估信息
export function assessmentList(propertyUnitId) {
  return request({
    url: `/property/unit/assessment/list/${propertyUnitId}`,
    method: "get",
  });
}

// 资产单元 评估信息历史记录
export function assessmentHistory(propertyUnitId) {
  return request({
    url: `/property/unit/assessment/history/${propertyUnitId}`,
    method: "get",
  });
}

// 新增 评估信息
export function addAssessment(data) {
  return request({
    url: "/property/unit/assessment/add",
    method: "post",
    data,
  });
}

// 编辑 评估信息
export function editAssessment(data) {
  return request({
    url: "/property/unit/assessment/edit",
    method: "post",
    data,
  });
}

// 归档 评估信息
export function archivingAssessment(data) {
  return request({
    url: "/property/unit/assessment/archiving",
    method: "post",
    data,
  });
}

// 【NEW】补充说明 资产类型
export function supplement(data) {
  return request({
    url: "/property/detail/type/supplement",
    method: "post",
    data,
  });
}

// 【NEW】校验资产类型是否存在对外招商的资产单元信息
export function investExist(propertyTypeId) {
  return request({
    url: `/property/detail/type/invest/exist/${propertyTypeId}`,
    method: "get",
  });
}


// 【NEW】【首页】统计 资产地块租赁相关提醒
export function leaseRemind(data) {
  return request({
    url: "/property/index/Lease/remind",
    method: "post",
    data,
  });
}

// 【NEW】 统计 资产基础信息 租赁相关提醒
export function detailLeaseRemind(data) {
  return request({
    url: "/property/detail/Lease/remind",
    method: "post",
    data,
  });
}

// 【NEW】使用情况占比
export function usageDetail(data) {
  return request({
    url: "/property/detail/usage",
    method: "post",
    data,
  });
}

// 【NEW】评估价格金额波动情况
export function assessDetailValue(data) {
  return request({
    url: "/property/detail/assess/value",
    method: "post",
    data,
  });
}

// 【NEW】租金水平
export function levelDetailLeaserent(data) {
  return request({
    url: "/property/detail/leaserent/level",
    method: "post",
    data,
  });
}

// 【NEW】统计 租赁协议智能提醒列表 （驾驶舱与资产管理首页）
export function leaseRemindList(data) {
  return request({
    url: "/property/index/lease/remind/list",
    method: "post",
    data,
  });
}

// 【NEW】统计 租金缴纳智能提醒列表 （驾驶舱与资产管理首页）
export function leaserentRemindList(data) {
  return request({
    url: "/property/index/leaserent/remind/list",
    method: "post",
    data,
  });
}

// 【NEW】驾驶舱 租户统计
export function leaseUserGroup(data) {
  return request({
    url: "/cockpit/lease/user/group",
    method: "post",
    data,
  });
}




// 【NEW】查询 租赁协议智能提醒列表（地块详情）
export function leaseDetailRemindList(data) {
  return request({
    url: "/property/detail/lease/remind/list",
    method: "post",
    data,
  });
}

// 【NEW】查询 租金缴纳智能提醒列表（地块详情）
export function leaserentDetailRemindList(data) {
  return request({
    url: "/property/detail/leaserent/remind/list",
    method: "post",
    data,
  });
}

//统计 租赁相关提醒
export function cockpitLeaseremind(data) {
  return request({
    url: "/cockpit/leaseremind",
    method: "post",
    data,
  });
}

//租赁协议智能提醒列表
export function cockpitLeaseremindList(data) {
  return request({
    url: "/cockpit/lease/remind/list",
    method: "post",
    data,
  });
}

//租金缴纳智能提醒列表
export function cockpitleaserentremindList(data) {
  return request({
    url: "/cockpit/leaserent/remind/list",
    method: "post",
    data,
  });
}

//宗地面积与资产地块总数
export function cockpitPropertyLandareaList(data) {
  return request({
    url: "/cockpit/property/landarea/list",
    method: "post",
    data,
  });
}

//建筑面积与证载面积对比
export function cockpitBuildingRegisterareaList(data) {
  return request({
    url: "/cockpit/building/register/area/list",
    method: "post",
    data,
  });
}
// 资产使用情况
export function cockpitPropertyUsageGroup(data) {
  return request({
    url: "/cockpit/property/usage/group",
    method: "post",
    data,
  });
}

// 驾驶舱 资产租户情况分析、资产租户总数
export function cockpitLeaseuserTypeGroup(data) {
  return request({
    url: "/cockpit/leaseuser/type/group",
    method: "post",
    data,
  });
}

// 驾驶舱 资产类别分析
export function cockpitPropertyCategoryGroup(data) {
  return request({
    url: "/cockpit/property/category/group",
    method: "post",
    data,
  });
}

// 驾驶舱 资产数据统计明细
export function cockpitBuildingDetail(data) {
  return request({
    url: "/cockpit/building/area/detail/list",
    method: "post",
    data,
  });
}



//逐年收益图表
export function cockpitleaserentYearGroup(data) {
  return request({
    url: "/cockpit/leaserent/year/group",
    method: "post",
    data,
  });
}

//查询盘活情况的分布列表
export function cockpitFreePropertyUnitList(data) {
  return request({
    url: "/cockpit/free/property/unit/list",
    method: "post",
    data,
  });
}

// 删除类型
export function delType(propertyTypeId) {
  return request({
    url: `/property/detail/type/del/${propertyTypeId}`,
    method: "get",
  });
}

//租户管理（首页）统计
export function leaseTotal(data) {
  return request({
    url: "/lease/total",
    method: "post",
    data,
  });
}

//租户管理（首页） 分页
export function leasePage(data) {
  return request({
    url: "/lease/page",
    method: "post",
    data,
  });
}

//智慧报表-资产地块 分页
export function wisdomTablePage(data) {
  return request({
    url: "/wisdom/table/page",
    method: "post",
    data,
  });
}

//智慧报表-资产地块 导出所有
export function wisdomTableExport(data) {
  return request({
    url: "/wisdom/table/export",
    method: "post",
    data,
  });
}

//【NEW】智慧报表-资产单元 资产地块下拉列表
export function wisdomPropertyList(data) {
  return request({
    url: "/wisdom/table/property/list",
    method: "post",
    data,
  });
}

//非经营列表
export function nobusinessList(data) {
  return request({
    url: "/nobusiness/punit/list",
    method: "post",
    data,
  });
}

// 【NEW】资产单元详情
export function nobusinessDetail(propertyUnitId) {
  return request({
    url: `/nobusiness/punit/base/${propertyUnitId}`,
    method: "get",
  });
}
// 【NEW】新增 资产单元
export function addNobusiness(data) {
  return request({
    url: "/nobusiness/punit/add",
    method: "post",
    data,
  });
}
// 【NEW】编辑 资产单元
export function editNobusiness(data) {
  return request({
    url: "/nobusiness/punit/edit",
    method: "post",
    data,
  });
}

// 【NEW】资产类别列表
export function propertyPcategoryList() {
  return request({
    url: "/property/index/pcategory/list",
    method: "get",
  });
}

// 【NEW】招商类型
export function propertyInvestList() {
  return request({
    url: "/property/invest/type/list",
    method: "get",
  });
}
